package com.xxxx.common.result;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xxxx.common.enmus.BaseResultEnum;
import lombok.Data;

import java.io.Serializable;

/**
 * @author ppliang
 * @date 2021/1/1 17:49
 */
@Data
public class BaseResult implements Serializable {

    private Integer code;
    private String message;
    Page<?> pageInfo;

    public static BaseResult success(){
        BaseResult result = new BaseResult();
        result.setCode(BaseResultEnum.SUCCESS.getCode());
        result.setMessage(BaseResultEnum.SUCCESS.getMessage());
        return result;
    }
}
